 export const url ="http://localhost:8090"//+uni.getStorageSync("ipPort")//"http://localhost:8089"// //  //localhost:8089
export const myRequst = (options) =>{
	return new Promise((resolve,reject)=>{
		// uni.showLoading({
		// 	title:"加载中...",
		// 	mask: true
		// })
		uni.request({
			url:url+options.url,
			method:options.method || 'GET',
			data:options.data || {},
			success: (res) => {
				// uni.hideLoading()
				if(res.data.code !=200){
					return uni.showToast({
						title:res.data.msg,
						
					})
				}
				resolve(res)
			},
			fail: (err) => {
				// uni.hideLoading()
				uni.showToast({
					title:'请求接口失败'
				})
				reject(err)
			}
		})
	})
}